// 权限处理的api
import request from '@/utils/request'

/**
 * 查询用户api
 */
export const queryUserApi = (data) => request({
  method: 'post',
  // url: '/Auth/QueryUser',
  url: '/Auth/User/Pagion',
  data
})

/**
 * 添加用户api
 */
export const addUserApi = (data) => request({
  method: 'post',
  url: '/Auth/User/Add',
  data
})

/**
 * 更新用户api
 */
export const editUserApi = (data) => request({
  method: 'put',
  url: '/Auth/User/Update',
  data
})

/**
 * 删除用户api
 */
export const deleteUserApi = (data) => request({
  method: 'delete',
  url: '/Auth/User/Delete',
  data
})

/**
 * 修改密码
 */
export const SetPassword = (data) => request({
  method: 'put',
  url: '/Auth/User/SetPassword',
  data
})

/**
 * 给用户添加角色
 */
export const AddUserRoleApi = (data) => request({
  method: 'post',
  url: '/Auth/User/AddRole',
  data
})

/**
 * 给用户添加角色
 */
export const getRoleApi = (data) => request({
  method: 'get',
  url: '/Auth/Role/Get',
  data
})

/**
 * 给用户删除角色
 */
export const RemoveUserRoleApi = (data) => request({
  method: 'delete',
  url: '/Auth/User/RemoveRole',
  data
})

/**
 * 增加角色部门
 */
export const AddUserDept = (data) => request({
  method: 'post',
  url: '/Auth/User/AddDept',
  data
})

/**
 * 移除角色部门
 */
export const RemoveDept = (data) => request({
  method: 'delete',
  url: '/Auth/User/RemoveDept',
  data
})

/**
 * 查询菜单api
 */
export const queryMenu = (data) => request({
  method: 'get',
  url: '/Auth/Menu/Get',
  data
})

/**
 * 增加菜单api
 */
export const addMenuApi = (data) => request({
  method: 'post',
  url: '/Auth/Menu/Add',
  data
})

/**
 * 修改菜单api
 */
export const editMenuApi = (data) => request({
  method: 'put',
  url: '/Auth/Menu/Update',
  data
})

/**
 * 删除菜单api
 */
export const deleteMenuApi = (data) => request({
  method: 'delete',
  url: '/Auth/Menu/Delete',
  data
})

/**
 * GetTree
 */
export const MenuGetTree = (data) => request({
  method: 'get',
  url: '/Auth/Menu/GetTree',
  data
})

/**
 * 查询角色api
 */
export const queryRoleApi = (data) => request({
  method: 'post',
  url: '/Auth/Role/Pagion',
  data
})

/**
 * 添加角色api
 */
export const addRoleApi = (data) => request({
  method: 'post',
  url: '/Auth/Role/Add',
  data
})

/**
 * 更新角色api
 */
export const editRoleApi = (data) => request({
  method: 'put',
  url: '/Auth/Role/Update',
  data
})

/**
 * 删除角色api
 */
export const delectRoleApi = (data) => request({
  method: 'delete',
  url: '/Auth/Role/Delete',
  data
})

/**
 * 添加角色的菜单
 */
export const AddRoleMenuApi = (data) => request({
  method: 'post',
  url: '/Auth/Role/AddMenu',
  data
})

/**
 * 删除角色的菜单
 */
export const RemoveRoleMenuApi = (data) => request({
  method: 'delete',
  url: '/Auth/Role/RemoveMenu',
  data
})

/**
 * 添加角色的职位
 */
export const getJobApi = (data) => request({
  method: 'get',
  url: '/Auth/Job/Get',
  data
})

/**
 * 添加角色的职位
 */
export const AddJobApi = (data) => request({
  method: 'post',
  url: '/Auth/Job/Add',
  data
})

/**
 * 删除角色的职位
 */
export const DeleteJobApi = (data) => request({
  method: 'delete',
  url: '/Auth/Job/Delete',
  data
})

/**
 * 增加扩展信息
 */
export const AddExt = (data) => request({
  method: 'post',
  url: '/Auth/User/AddExt',
  data
})

/**
 * 删除角色的扩展信息
 */
export const DeleteExtendApi = (data) => request({
  method: 'delete',
  url: '/Auth/Extend/Delete',
  data
})

/**
 * 更新角色的扩展信息
 */
export const UpdateExtendApi = (data) => request({
  method: 'put',
  url: '/Auth/Extend/Update',
  data
})

/**
 * 增加部门
 */
export const AddDept = (data) => request({
  method: 'post',
  url: '/Auth/Dept/Add',
  data
})

/**
 * 删除部门
 */
export const DeleteDept = (data) => request({
  method: 'delete',
  url: '/Auth/Dept/Delete',
  data
})

/**
 * 更新部门
 */
export const UpdateDept = (data) => request({
  method: 'put',
  url: '/Auth/Dept/Update',
  data
})

/**
 * 获取部门
 */
export const GetTreeDept = (data) => request({
  method: 'get',
  url: '/Auth/Dept/GetTree',
  data
})

/**
 * 获取部门
 */
export const GetDept = (data) => request({
  method: 'get',
  url: '/Auth/Dept/Get',
  data
})

/**
 * 退出接口
 */
export const Logout = (data) => request({
  method: 'post',
  url: '/Auth/Logout',
  data
})

/**
 * 获取在线用户数据
 */
export const GetOnlineUsers = (data) => request({
  method: 'get',
  url: '/Auth/GetOnlineUsers',
  data
})

/**
 * 退出在线用户
 */
export const LogoutF = (data) => request({
  method: 'post',
  url: '/Auth/LogoutF',
  data
})

/**
 * 注册用户
 */
export const AddUserBySupplier = (data) => request({
  method: 'post',
  url: '/Auth/User/AddUserBySupplier',
  data
})

